package cn.steel.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.core.authority.mapping.GrantedAuthoritiesMapper;
import org.springframework.security.core.authority.mapping.NullAuthoritiesMapper;

@Configuration
public class SecurityRolePrefixConfig {

    @Bean
    public GrantedAuthoritiesMapper authoritiesMapper() {
        // 不再加前缀，直接使用数据库中的 ROLE_ADMIN 等原值
        return new NullAuthoritiesMapper();
    }
}
